﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WmsApp.WmsService;

namespace WmsApp.Service
{
    public class PayApplyBillItemService : IEntityService<PayApplyBillItem, PayApplyBillItemService>
    {
        #region IEntityService<PayApplyBillItem> Members

        public List<PayApplyBillItem> GetEntityList()
        {
            throw new NotImplementedException();
        }

        public List<PayApplyBillItem> GetEntityList(string condition)
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<PayApplyBillItem> list = sc.GetPayApplyBillItemsByCondition(condition);
            foreach (var payApplyBillItem in list)
            {
                payApplyBillItem.BindPropertyChanged();
            }
            return list;
        }

        public void SaveEntityList(List<PayApplyBillItem> list)
        {
            throw new NotFiniteNumberException();
        }

        public PayApplyBillItem GetEntity(string key)
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            PayApplyBillItem obj= sc.GetPayApplyBillItem(key);
            obj.BindPropertyChanged();
            return obj;
        }

        #endregion
    }
}
